<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>JSTL Java标准标签库练习</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
</head>
<body>
	${'*****set标签：*****' }
	<br />
	<c:set var="a" value="aaa"></c:set>
	${pageScope.a }
	<br />
	<c:set var="b" value="bbb" scope="session"></c:set>
	<c:set var="a" value="AAA" scope="request"></c:set>
	<c:set var="b" value="BBB" scope="application"></c:set>
	${sessionScope.b }
	<br /> ${requestScope.a }
	<br /> ${applicationScope.b }
	<br /> 不指定储存空间：
	<br /> ${a }
	<br /> ${b }
	<br />
	<br /> ${'*****out标签：*****' }
	<br />
	<c:out value="hello"></c:out>
	<br />
	<c:out value="${null }" default="hello is not exist"></c:out>
	<br />
	<c:out value="<h1>hello</h1>" escapeXml="false"></c:out>
	<br />
	<br />${'*****remove标签：*****' }
	<c:remove var="a" />
	<br />pageScope.a--> ${pageScope.a }
	<br />sessionScope.b--> ${sessionScope.b }
	<br />requestScope.a--> ${requestScope.a }
	<br />applicationScope.b--> ${applicationScope.b }
	<%
		int[] a = { 1, 3, 5, 7 };
	%>
	<br />
	<br />${'*****remove标签：*****' }
	<c:set var="gender" value="男"></c:set>
	<br />
	<c:if test="${gender eq '男' }">先生您好</c:if>
	<br />
	<br /> ${'*****for标签：*****' }
	<br />
	<c:forEach begin="1" end="9" var="i">
		<c:forEach begin="1" end="${i }" var="j">
			${j }*${i }=${i*j }&nbsp;
		</c:forEach>
		<br />
	</c:forEach>
</body>